package hcn.api.service.api.newdiagnosis;

import ctd.controller.exception.ControllerException;
import ctd.util.annotation.RpcService;
import hcn.util.BaseResponse;
import hcn.protocol.ods.PrecalculatedFeeRequestBean;
import hcn.protocol.ods.diagnosis.*;
import hcn.protocol.ods.newdiagnosis.*;
import hcn.protocol.ods.paymentXML.*;

import java.util.List;
import java.util.Map;

/**
 * @Author: zhusm@bsoft.com.cn
 *
 * @Description: 20190420版诊间支付接口
 *
 * @Create: 2019-04-19 10:08
 **/
public interface NewDiagnosisPayTradeService {

    /**
     * 获取待支付列表
     * @return
     */
    @RpcService
    BaseResponse<List<NewGetUnpayListResponseBean>> getUnpayedRecords(String mpiId,String orgId, int code, Map<String, String> cert, List<Map<String, Object>> cards,Integer outpatientType,String hisUrl) ;
    /**
     * 云支付与诊间支付合并，获取待支付列表
     * @return
     */
    @RpcService
    BaseResponse<List<NewQueryUnPayListResponseBean>> queryUnPayedRecords(String mpiId,String orgId, int code, Map<String, String> cert, List<Map<String, Object>> cards,Integer outpatientType,String hisUrl) ;

    /**
     * 获取已支付列表
     * @return
     */
    @RpcService
    BaseResponse<List<NewGetPayedListResponseBean>> getPayedRecords(String mpiId,String orgId, int code, Map<String, String> cert, List<Map<String, String>> cards,String hisUrl);

    /**
     * 获取费用预结算金额
     * @return
     */
    @RpcService
    BaseResponse<NewGetPrecalculatedFeeResponseBean> getPrecalculatedFee(PrecalculatedFeeRequestBean request);

    /**
     *确认费用结算处理
     * @param bean
     * @return
     */
    @RpcService
    BaseResponse<NewNotifyPayedResponseBean> notifyPayed(NewNotifyPayedRequestBean bean,String orgId) ;

    /**
     * 获取收费单据详细列表
     * @return
     */
    @RpcService
    BaseResponse<NewGetFeeDetailResponseBean> getFeeDetail(String orgId, String patientId, String invoiceNumber,String hisUrl);
    /**
     * 获取收费单据详细列表
     * @return
     */
    @RpcService
    BaseResponse<NewGetFeeDetailResponseBean> getFeeDetailXML(String orgId, String patientId, String invoiceNumber,String paymentNumber,String hisUrl);

    /**
     * 校验关联业务退费条件
     * @param bean
     * @return
     */
    @RpcService
    BaseResponse<CheckRefundConditionResponseBean> checkRefundCondition(CheckRefundConditionRequestBean bean);


    /**
     * @description: 互联互通，支付公用
     * @author: chenJij@bsoft.com.cn
     * @date: 2019/11/28 17:18
     */
    @RpcService
    CreateOrderNoResponseBean createOrderNo(CreateOrderNoRequestBean bean);

    /**
     * @description: 查询HIS药房列表
     */
    @RpcService
    List<StoresInfo> findRecipeSuppliers(FindRecipeSuppliersRequestBean request);

/**
 * @Author:FangZhiyi
 * @Description 诊间支付，待支付列表，XML格式
 * @Data Created in 2020/11/5 16:36
 * @Moddified By:
 */
    @RpcService
    BaseResponse<List<NewQueryUnPayListResponseBean>> getUnPayedRecordsXML(String mpiId,String orgId, int code, Map<String, String> cert, List<Map<String, Object>> cards,
        Integer outpatientType,String hisUrl) ;

    /**
     * @Author:FangZhiyi
     * @Description 诊间支付，已支付列表，XML格式
     * @Data Created in 2020/11/5 16:38
     * @Moddified By:
     */
    @RpcService
    BaseResponse<List<NewGetPayedListResponseBean>> getPayedRecordsXML(String mpiId,String orgId, int code, Map<String, String> cert, List<Map<String, Object>> cards,String hisUrl);

   /**
    * @Author:FangZhiyi
    * @Description 诊间支付，预结算，XML格式
    * @Data Created in 2020/11/5 16:39
    * @Moddified By:
    */
    @RpcService
    BaseResponse<NewGetPrecalculatedFeeResponseBean> getPrecalculatedFeeXML(PrecalculatedFeeRequestBean request) throws ControllerException;

    /**
     * @Author:FangZhiyi
     * @Description 门诊结算信息新增（支付确认，诊间支付，云诊室通用）
     * @Data Created in 2020/11/9 21:01
     * @Moddified By:
     */
    @RpcService
    BaseResponse<NewNotifyPayedResponseBean> notifyPayedXML(NewNotifyPayedRequestBean bean,String orgId) throws ControllerException;

    /**
     * @Author:FangZhiyi
     * @Description 互联互通，支付公用(XML格式）
     * @Data Created in 2020/11/12 22:04
     * @Moddified By:
     */
    @RpcService
    CreateOrderNoResponseBean createOrderNoXML(CreateOrderNoRequestBean bean);

    /**
     * @Author:FangZhiyi
     * @Description 获取代煎费（XML格式）
     * @Data Created in 2020/11/13 14:22
     * @Moddified By:
     */
    @RpcService
    GetDecoctingFeeXMLResp getDecoctingFeeXML(GetDecoctingFeeXMLReq decoctingFeeXMLReq) throws ControllerException;

    /**
     * @Author:FangZhiyi
     * @Description 门诊药房列表查询(XML格式)
     * @Data Created in 2020/11/13 16:00
     * @Moddified By:
     */
    @RpcService
    FindRecipeSuppliersXMLResp findRecipeSuppliersXML(FindRecipeSuppliersXMLReq findRecipeSuppliersXMLReq);


    /**
     * @description: 查询可用抵用券列表
     * @author: chenJij@bsoft.com.cn
     * @date: 2021/9/17 7:15
     * @param: getUsableVoucherListReq
     * @return: hcn.protocol.ods.paymentXML.GetUsableVoucherListResp
     */
    @RpcService
    GetUsableVoucherListResp getUsableVoucherList(GetUsableVoucherListReq getUsableVoucherListReq);

    /**
     * @description: 查询HIS支付结果
     * @author: chenJij@bsoft.com.cn
     * @date: 2022/3/13 22:36
     * @param: bean
     * @return: hcn.protocol.ods.paymentXML.QueryPayedResponseBean
     */
    @RpcService
    QueryPayedResponseBean queryPayed(QueryPayedRequestBean bean);
}
